﻿using System.Net;

namespace Toybox.NicoSharp.Utilities
{
	public static class IdUtility
	{

		public static string GetUserId(CookieCollection cookies)
		{
			return GetUserId(cookies["user_session"]);
		}

		public static string GetUserId(Cookie cookie)
		{
			return cookie.Value.Remove(0, "user_session_".Length).Split('_')[0];
		}

	}
}
